package poly;

public class Student {
    private int studentId;
    private String name;
    private double EnglishGrade;
    private double MathGrade;
    private double ComputerGrade;

    public Student(int studentId,String name,double EnglishGrade,double MathGrade,double ComputerGrage){
        this.studentId = studentId;
        this.name = name;
        this.EnglishGrade = EnglishGrade;
        this.MathGrade = MathGrade;
        this.ComputerGrade = ComputerGrage;
    }

    public String toString(){
        return "studentId = " + studentId +
                ", name = " + name +
                ",EnglishGrade = " + EnglishGrade +
                ",MathGrade = " + MathGrade +
                ", ComputerGrade = " + ComputerGrade;
    }

    public double sum(){
        return EnglishGrade + MathGrade + ComputerGrade;
    }

    public double textScore(){
        return sum() / 3;
    }
}
